package com.lzw.breezeNovel.webApp.controller.video;


import com.lzw.breezeNovel.common.result.Result;

import com.lzw.breezeNovel.webApp.service.video.VideoLikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;



/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.webApp.controller.video
 * @date 2025/3/23
 * @description 视频点赞表
 */
@RestController
@RequestMapping("/app/videoLike")
@SuppressWarnings("all")
public class VideoLikeController {

   /**
    * 注入service
    */
   @Autowired
  private VideoLikeService videoLikeService;

   /**
    * 进行点赞
    */
     @RequestMapping("/like")
     public Result like(@RequestParam Long shortId,@RequestParam Long userId) {
        videoLikeService.like(shortId,userId);
        return Result.ok();
     }

    /**
     * 取消点赞
     */
    @RequestMapping("/unlike")
    public Result unlike(@RequestParam Long shortId,@RequestParam Long userId) {
        videoLikeService.unlike(shortId,userId);
        return Result.ok();
    }



}
